<template>
  <el-pagination
    :background="true"
    class="msg-pagination-container"
    @size-change="handleSizeChange"
    @current-change="handleCurrentChange"
    :page-sizes="[3, 10, 15, 20]"
    :page-size="data.count"
    layout="total, sizes, prev, pager, next, jumper"
    :total="data.total"
  >
  </el-pagination>
</template>
<script>
export default {
  name: "Page",
  data() {
    return {};
  },
  props: ["data"],
  methods:{
    handleCurrentChange(index){
        console.log(index)
        this.$emit('pageChange',index)
    },
    handleSizeChange(index){
        console.log(index)
        this.$emit('sizeChange',index)
    }
  }
};
</script>
